package com.aipanda.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 友好链接类
 * 
 * @param name 友好链接名称
 * @param type 友好链接类型
 * @param logo
 * @param url
 * @author wanyuxiang
 * 
 */
@Entity
@Table(name = "aipanda_friend_link")
public class FriendLink extends OrderEntity {
	private static final long serialVersionUID = 3019642557500517628L;
	private String name;
	private Type type;
	private String logo;
	private String url;

	/**
	 * 友好链接类型类
	 * 
	 * @param text
	 * @param image
	 * @author wanyuxiang
	 * 
	 */
	public enum Type {
		text, image;
	}

	@NotEmpty
	@Length(max = 255)
	@Column(nullable = false)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@NotNull
	@Column(nullable = false)
	public Type getType() {
		return this.type;
	}

	public void setType(Type type) {
		this.type = type;
	}

	@Length(max = 255)
	public String getLogo() {
		return this.logo;
	}

	public void setLogo(String logo) {
		this.logo = logo;
	}

	@NotEmpty
	@Length(max = 255)
	@Column(nullable = false)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}
}
